<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<button id="btn">点击</button>
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
<script>
  $('#btn').click(function () {
    var frame = document.createElement('script');
    frame.src = 'http://localhost:9076/jsonp?name=shelley&age=30&callback=func';
    $('body').append(frame);
  });

  function func(res) {
    console.log(res)
    alert(res.data.req + res.data.name + '你已经' + res.data.age + '岁了');
  }
</script>
</body>
</html>